package com.doitedu.day04.funcs

import scala.collection.immutable

/**
 * @Date 22.6.23
 * @Created by HANGGE
 * @Description
 * 拉链
 *
 */
object _08ZipWithIndex {
  def main(args: Array[String]): Unit = {
    val names = List[String]("wenkai" , "zhanqian" , "yifu" , "yuge" , "taoge")
    val ages  = Array[Int](18,19,20,42)
    val tp: immutable.Seq[(String, Int)] = names.zipWithIndex
    tp.foreach(println)
    //(0 , wenkaim , 18)
    val res: Seq[((String, Int), Int)] = names.zip(ages).zipWithIndex
    res.foreach(tp=>{
      println((tp._2 , tp._1._1 , tp._1._2))
    })


  }

}
